package com.example.rabbitmqdemo.test;

import com.example.rabbitmqdemo.springbootRabbitmq.HelloCustomer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class B {

    @Resource(name = "a")
    private A a;

    @Autowired
    private HelloCustomer helloCustomer;

    public void fun1(){
        System.out.println(helloCustomer);
        a.fun();
    }

    public void test1(){
        fun1();
        System.out.println(11);
    }
}
